﻿
$('#attendees').live('click', function () {

    if ($('#attendees').hasClass('expanded')) {
        $('#attendees').addClass('collapsed').removeClass('expanded');
        $("#attendeeButton").attr('src', '../../Images/collapsed.png');

    }
    else {
        $('#attendees').addClass('expanded').removeClass('collapsed');
        $("#attendeeButton").attr('src', '../../Images/expand.png');
    }
    $(".attendees").fadeToggle('slow');
});

$('#sponsors').live('click', function () {
    if ($('#sponsors').hasClass('expanded')) {
        $('#sponsors').addClass('collapsed').removeClass('expanded');
        $("#sponsorButton").attr('src', '../../Images/collapsed.png');
    }
    else {
        $('#sponsors').addClass('expanded').removeClass('collapsed');
        $("#sponsorButton").attr('src', '../../Images/expand.png');
    }
    $("#sponsorList").fadeToggle('slow');
});

jQuery.fn.fadeToggle = function (speed, easing, callback) {
    return this.animate({ opacity: 'toggle' }, speed, easing, callback);
}; 